﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OperateLog.aspx.cs" Inherits="Whir_System_Module_Log_OperateLog" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        if (top.location == self.location) { 
            alert('禁止访问子栏目页！将跳转到默认页面');
            top.location='../../Default.aspx';
        } 
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DADADA"
            id="divDelete" runat="server">
            <tr>
                <td class="form_td">
                    <asp:Button ID="btnDelete" runat="server" Text="删除" CssClass="btn_default" OnClick="btnDelete_Click"
                        OnClientClick="return confirm('确定要删除吗?');" />
                </td>
            </tr>
        </table>
        <br />
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DADADA">
            <tr>
                <td height="30" align="center" class="form_tdText" width="15%"><strong>查询操作者</strong>
                </td>
                <td class="form_td" width="30%">
                    <asp:TextBox ID="txtOperateUser" runat="server"></asp:TextBox>
                </td>
                <td height="30" align="center" class="form_tdText" width="15%"><strong>查询类型</strong>
                </td>
                <td height="30" align="center" class="form_td" width="30%">
                    <asp:DropDownList ID="ddlOperateType" runat="server">
                        <asp:ListItem Text="=== 请选择 ===" Value="-1"></asp:ListItem>
                        <asp:ListItem Text="添加" Value="添加"></asp:ListItem>
                        <asp:ListItem Text="修改" Value="修改"></asp:ListItem>
                        <asp:ListItem Text="删除" Value="删除"></asp:ListItem>
                        <asp:ListItem Text="登录" Value="登录"></asp:ListItem>
                        <asp:ListItem Text="非法访问" Value="访问页面"></asp:ListItem>
                        <asp:ListItem Text="退出" Value="退出"></asp:ListItem>
                        <asp:ListItem Text="其它" Value="其它"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td height="30" align="center" class="form_td">
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="btn_default" OnClick="btnSearch_Click" />
                </td>
            </tr>
        </table>
        <whir:ezGridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%"
            DataKeyNames="operateLogID">
            <HeaderStyle CssClass="grid_Title" Height="20px" />
            <RowStyle CssClass="grid_td" Height="23px" HorizontalAlign="Center" />
            <CustomColumns>
                <NumberColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
                <MultiChooseColumn Align="Left" Position="0" Priority="0" Visible="True" Width="0" />
                <RadioButtonColumn Align="Left" Position="0" Priority="0" Visible="False" Width="0" />
            </CustomColumns>
            <Columns>
                <asp:BoundField HeaderText="标题" DataField="title" />
                <asp:TemplateField HeaderText="类型">
                    <itemtemplate>
                        <%# getType(Eval("operateType").ToString())%>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="结果">
                    <itemtemplate>
                        <%# Eval("operateResult").ToString() == "True" ? "成功" : "失败" %>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="操作者" DataField="operateUser" />
                <asp:TemplateField HeaderText="操作页面">
                    <itemtemplate>
                        <a href="<%# Eval("operateUrl") %>" target="_blank" title="<%# Eval("operateUrl") %>">
                        <%# Whir.Common.WebHelper.StringHelper.CutString(Eval("operateUrl").ToString(), 30)%></a>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="操作时间" DataField="createDate" />
            </Columns>
        </whir:ezGridView>
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="f-gray" CustomInfoHTML="目前在第<font color=red>%currentPageIndex%</font>页,共有<font color=red>%PageCount%</font>页,共有<font color=red>%RecordCount%</font>条记录&nbsp;&nbsp;&nbsp;&nbsp;"
            FirstPageText="首页" LastPageText="末页" NextPageText="下一页" OnPageChanged="AspNetPager1_PageChanged"
            PrevPageText="上一页" ShowCustomInfoSection="Left" ShowInputBox="Always" ShowPageIndex="False"
            PageSize="15" Width="99%">
        </webdiyer:AspNetPager>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DADADA"
            id="divMessage" runat="server" visible="false">
            <tr>
                <td class="form_td"><strong>无法找到匹配的数据</strong> </td>
            </tr>
        </table>
    </form>
</body>
</html>
